]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
recorder: Don't crash on pipeline errors
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 4 Jul 2012 22:08:28 +0000 (00:08 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Jul 2012 14:23:21 +0000 (16:23 +0200)
In case of error, the recorder pipeline is reset to NULL, so don't
access current_pipeline->src in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=679445

src/shell-recorder.c

index 120ca0fe4e0b1f0011d7c591d52be2e87901d286..829ff32e31a1edafd09ae3cdd6dd2272059ed95b 100644 (file)
@@ -526,6 +526,8 @@ recorder_record_frame (ShellRecorder *recorder)
   guint size;
   GstClockTime now;
 
+  g_return_if_fail (recorder->current_pipeline != NULL);
+
   /* If we get into the red zone, stop buffering new frames; 13/16 is
   * a bit more than the 3/4 threshold for a red indicator to keep the
   * indicator from flashing between red and yellow. */